import BaseApi from './BaseApi';

const controller = "/entryExitRecord";
export default {
    /**
     * @description 获取车辆进出场记录列表

     * @date 2019/7/11
     */
    getEntryExitRecordList(condition) {
        return BaseApi.requestPost("/entryExitRecord/getEntryExitRecordList", condition);
    },
    /** excel数据导出
     * @description
 
     * @date 2019/7/11
     */
    exportEntryExitRecordExcel(condition) {
        return this.requestDownloadGet(controller, "/entryExitRecordExcel", condition);
    },
    downLoadEntryExitImages(condition) {
        return this.requestPost(controller, "/downLoadEntryExitImages", condition);
    },
    //车牌更正  /entryExitRecord/updatePlate
    editPlate(condition) {
        return this.requestPost(controller, "/updatePlate", condition)
    },

    /* 获取停车点管理人 */
    getParkManagerList({ parkId }) {
        return this.requestPost(controller, "/getParkManagerList", { parkId });
    },

    /* 派遣 */
    dispatchManager({ targetId, parkName, parkingSpaceName, truckSpaceId, to }) {
        return this.requestPost(controller, '/dispatch', { targetId, parkName, parkingSpaceName, truckSpaceId, to });
    },

    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    },
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },
    requestDownloadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    }

}